<?php
namespace app\index\logic;
use app\common\model\Base;

class Dngg extends Base
{
    public function getAdvertisement() {
        $res = Dngg::name('dngg')->select()->toArray();
        $k = 0;
        foreach($res as $v) {
            if($v['gg_class'] >= 5) {
                $k += 1;
                //电脑版对联广告
                $updlgg[$k] = $v['gg_img'];
                $updlggurl[$k] = $v['gg_url'];
            }
        }
        return array('dnblunbo'=>$res,'updlgg'=>$updlgg,'updlggurl'=>$updlggurl);
    }
    
}